]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Return expected type from handleDragOver for Activities button actors
authorStefano Facchini <stefano.facchini@gmail.com>
Sat, 11 Feb 2012 10:14:43 +0000 (11:14 +0100)
committerStefano Facchini <stefano.facchini@gmail.com>
Sun, 12 Feb 2012 19:22:04 +0000 (20:22 +0100)
Currently they return 'undefined' instead of something meaningful,
e.g. DND.DragMotionResult.CONTINUE. This was unnoticed because none
of the ancestors of the Activities button actors do any drag handling.
The only visible issue are JS errors generated when dragging, for example,
a window thumbnail over the button, because the cursor cannot be set.

https://bugzilla.gnome.org/show_bug.cgi?id=669921

js/ui/layout.js
js/ui/panel.js

index fb808ec52478d99edd8f4c8f34f61723df5585c7..ae6ceb349150ac7918ed7f9c284969f0dc8b310d 100644 (file)
@@ -8,6 +8,7 @@ const Shell = imports.gi.Shell;
 const Signals = imports.signals;
 const St = imports.gi.St;
 
+const DND = imports.ui.dnd;
 const Main = imports.ui.main;
 const Params = imports.misc.params;
 const ScreenSaver = imports.misc.screenSaver;
@@ -490,13 +491,15 @@ const HotCorner = new Lang.Class({
 
     handleDragOver: function(source, actor, x, y, time) {
         if (source != Main.xdndHandler)
-            return;
+            return DND.DragMotionResult.CONTINUE;
 
         if (!Main.overview.visible && !Main.overview.animationInProgress) {
             this.rippleAnimation();
             Main.overview.showTemporarily();
             Main.overview.beginItemDrag(actor);
         }
+
+        return DND.DragMotionResult.CONTINUE;
     },
 
     _onCornerEntered : function() {
index 25f27bed160d390854c52bf0afe4efa0e37ba7b0..088719a447338bb4d9556684c49dfb1e29d56e25 100644 (file)
@@ -13,6 +13,7 @@ const Signals = imports.signals;
 
 const Config = imports.misc.config;
 const CtrlAltTab = imports.ui.ctrlAltTab;
+const DND = imports.ui.dnd;
 const Layout = imports.ui.layout;
 const Overview = imports.ui.overview;
 const PopupMenu = imports.ui.popupMenu;
@@ -660,12 +661,14 @@ const ActivitiesButton = new Lang.Class({
 
     handleDragOver: function(source, actor, x, y, time) {
         if (source != Main.xdndHandler)
-            return;
+            return DND.DragMotionResult.CONTINUE;
 
         if (this._xdndTimeOut != 0)
             Mainloop.source_remove(this._xdndTimeOut);
         this._xdndTimeOut = Mainloop.timeout_add(BUTTON_DND_ACTIVATION_TIMEOUT,
                                                  Lang.bind(this, this._xdndShowOverview, actor));
+
+        return DND.DragMotionResult.CONTINUE;
     },
 
     _escapeMenuGrab: function() {